Ŀ Ŀ CMOS bilgileri ٳ PS 27 Ekim'95 Levent Yava Aada kodunu bulacanz programmz CMOS bilgilerini ekrana getirir. #include #define UCHAR unsigned char char *drive[]={ "Not Installed.","360Kb.","1.2Mb.","720Kb.","1.44Mb.",}; UCHAR GetByte(UCHAR adr ) { outportb(0x70,adr); return (inportb(0x71)); } void main() { UCHAR a,b,c; printf("\nCMOS report by Levent Yava.\n"); a=GetByte(0xd); b=GetByte(0xe); c=GetByte(0x10); printf(" CMOS checksum %s\n",(b&64) ? "failure.":"OK."); printf("Equipment configuration %s\n",(b&32) ? "failure":"OK."); printf(" CMOS battery %s\n",(a&64) ? "dead.":"OK."); printf(" Real time battery %s\n",(b&128) ? "failure.":"OK."); printf(" CMOS time %s\n",(b&4) ? "failure.":"OK."); printf(" RAM size %s\n",(b&16) ? "failure.":"OK."); printf(" Hard disk %s\n",(b&8) ? "failure.":"OK."); printf(" First drive %s\n",drive[c>>4]); printf(" Second drive %s\n",drive[c&0xf]); printf("\n"); }